<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
	<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> 
	<META HTTP-EQUIV="Expires" CONTENT="0"> 
	<title>我的提取</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="../../css/font_eolqem241z66flxr.css" media="all" />
	<link rel="stylesheet" href="../../css/news.css" media="all" />
	<script src="../../layui/js/angular.js"></script>
	<script type="text/javascript" src="../../layui/layui/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="../../layui/layui/GetPath.js"></script>
	<script src="../../layui/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../layui/js/fy.js"></script>
	<script type="text/javascript" src="../../layui/layui/layer.ext.js"></script>
	<script type="text/javascript" src="../../layui/lay/modules/layer.js"></script>
</head>
<body class="childrenBody">
<div class="layui-form links_list" ng-app="myApp" ng-controller="customersCtrl" align="center" >
	<blockquote class="layui-elem-quote news_search">
		<div align="left">
			<div class="layui-inline">
			   <div class="layui-input-inline">
		        <input class="layui-input" id="test8" placeholder="请选择年月" type="text" style="width: 260px" readonly contentEditable="false">
		      </div>
			     <input ng-click="cx()" type="button" class="layui-btn layui-btn-primary" value="查&nbsp;&nbsp;&nbsp;&nbsp;询" >
			</div>
			<div class="layui-inline">
				<!-- <a onclick="wytq()" class="layui-btn recommend" style="background-color:#5FB878">我要提取</a> -->
				<a class="layui-btn" id="aaa">我要提取</a>
			</div>
			<div class="layui-inline">
				<div class="layui-form-mid layui-word-aux">个人网上营业厅仅支持退休及离职提取，其他提取请到营业部柜台办理</div>
			</div>
		</div>
	</blockquote>
		<div>
 			<loading>查询中请稍后</loading>
	  		<table class="layui-table" id="test">
				<tr  style="background-color:#f1f1f1">
					<th>提取放款时间</th>
					<th>提取进度</th>
					<th style="text-align:right;">提取金额</th>
					<th>提取原因</th>					
				</tr> 
				<tr ng-repeat="x in names" align="center">
					<td>{{ x.JZRQ }}</td>
					<td>{{ x.TQJD }}</td>
					<td style="text-align:right;">{{ x.FSE | currency:"￥"}}</td>
					<td>{{ x.TQYY }}</td>		
				</tr>		
			</table>
		</div>
		<div class="layui-btn-group">
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Sy()">首页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Previous()">上一页</button>
			<button ng-repeat="page in pageList" class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="selectPage(page)">{{ page }}</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Next()">下一页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm"
				ng-click="Wy()">尾页</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm "
				>{{selPage}}/{{pages}}</button>
		</div>
	</div>
	<div id="page"></div>
	<script type="text/javascript" src="../../layui/layui/layui.js"></script>
	<script>
		layui.use('layer', function(){
  			var layer = layui.layer;
		});              
	</script>
	
	<script> 
        	var a;
			var app = angular.module('myApp', []);
			 app.directive('loading', function(){  
		        return {  
		            restrict: 'E',  
		            transclude: true,  
		            template: '<div ng-show="loading" class="loading" id="allDiv"  style="position:fixed; top:0px; left:0px; width:100%; height:100%; display:none; background-color:#000; opacity: 0.5; z-index:99999;">'  
		            +'<img alt="" src="../../layui/layui/img/jz.gif" style="vertical-align: middle;width:30px; height:30px; position: absolute; top:50%; left:50%; margin-top: -50px; margin-left:-50px;"/>'
		            +'</div>',  
		            link: function (scope, element, attr) {  
		                scope.$watch('loading', function (val) {  
		                    if (val){  
		                        document.getElementById("allDiv").style.display = "block";  
		                    }else{  
		                        document.getElementById("allDiv").style.display = 'none';  
		                    }  
		                });  
		            }  
		        };
		    });  
			    app.controller('customersCtrl', function($scope, $http) {
			    $scope.setLoading =function(){  
				    if($scope.loading ==undefined || $scope.loading ==false){  
				        $scope.loading=true;  
				    }else{  
				        $scope.loading=false;  
				    };
				};
			    $scope.cx = function () {
			    	var rq=document.getElementById("test8").value;
			    	if(rq!="" && rq != null){
				   		$scope.setLoading();
		      			$scope.params={sj:document.getElementById("test8").value},
					$http({
						url:getPath() + "/wsyyt/grtqmxcontroller/test",
						method:'post',
						params:$scope.params
					}).then(
						function(res) {
							$scope.data = res.data.data;
							$scope.setLoading();
							if(res.data.msg==null){
								
								 	layer.msg("登陆失效请重新登陆");
									setTimeout(function () {
										window.top.location.href=res.data;
									}, 1500);
									return;
								 
							}else if(res.data.code==1){
								$scope.names="";
								$scope.selPage="";
								$scope.selectPage="";
								$scope.pages="";
								$scope.page="";
								$scope.pageList="";
								//layer.msg('提示：'+res.data.CW,{icon: 5});
								layer.alert('提示：'+res.data.CW, {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
										
								     }});			
								return null;						
								}
								if(res.data==""){
								$scope.names="";
								$scope.selPage="";
								$scope.selectPage="";
								$scope.pages="";
								$scope.page="";
								$scope.pageList="";
								//layer.msg('提示：用户没有提取信息',{icon: 5});		
								layer.alert('提示：用户没有提取信息', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
										
								     }});	
								return null;						
								}
								if($scope.data.RETDATA==null){
									console.log(res);
									a = res.data.CNT;
									feny($scope.data);
								}else{
									console.log(res);
									a = res.data.CNT;
									feny($scope.data.RETDATA);
								}
							});			
						}else{
								$scope.names="";
								$scope.selPage="";
								$scope.selectPage="";
								$scope.pages="";
								$scope.page="";
								$scope.pageList="";
								//layer.msg('提取年月不能是空！',{icon: 5});
								layer.alert('提示：提取年月不能是空！', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
										
								     }});	
								return null;	
						}
					};
				});
		</script>
	<script>
	layui.use('laydate', function(){
	  var laydate = layui.laydate;
	  laydate.render({
	    elem: '#test8'
	    ,type: 'month'
	    ,range: true
	  });
	});
	</script>
	<script type="text/javascript" src="../../layui/layui/jquery-3.2.1.min.js"></script>
	<script>
		/* function wytq(){	
			$.ajax({
				url : getPath()+'/wsyyt/jcjbqkcontroller/test',
				method : 'post',
				dataType : 'JSON',
				success : function(result) {
					var data = result.data;//这边的data属性是object
					if(result.msg==null){
						layer.msg("登陆失效请重新登陆");
										setTimeout(function () {
											window.top.location.href=res.data;
										}, 1500);
										return;
					}
					else if(result.code==0){
						$.each(data[0], function(key, value) {
							var ye=data[0].GRZHZT;
							if(data[0].GRZHZT=='停缴'){
								alert("111");
								window.location.href='/wsyyt/page/gjj/tqRequest.html';
							}else{
								layer.alert('提示：您的当前状态不是停缴状态、不能进行离职、退休提取！', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
										
								}});	
							}
						});
					}else{
						layer.alert('提示：'+result.CW, {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
										
								}});	
					}
				},
			});
		}; */
		  function pddk(){
				$.ajax({
				url : getPath()+'/wsyyt/lishicontroller/dkpd',
				method : 'post',
				dataType : 'JSON',
				success : function(result) {
					if(result.code=="0"){
					layer.alert('提示：您的当前有贷款记录、不能进行离职、退休提取！', {
							      skin: 'layui-layer-molv' //样式类名  自定义样式
							     ,closeBtn: 1    // 是否显示关闭按钮
							      ,anim: 1 //动画类型
							     ,btn: ['确认'] //按钮
							      ,icon: 5    // icon
							     ,btn2:function(){
									
									}});
									return null;	
					}else{
						window.location.href='/wsyyt/page/gjj/tqRequest.html';
						return null;	
					}
				}
			});
		} 
		$("#aaa").click(function(){
			$.ajax({
				url : getPath()+'/wsyyt/jcjbqkcontroller/test',
				method : 'post',
				dataType : 'JSON',
				success : function(result) {
					var data = result.data;//这边的data属性是object
					if(result.msg==null){
						layer.msg("登陆失效请重新登陆");
										setTimeout(function () {
											window.top.location.href=res.data;
										}, 1500);
										return;
					}
					else if(result.code==0){
						
							var ye=data[0].GRZHZT;
							if(data[0].GRZHZT=='停缴'){
								pddk();
							}else{
								layer.alert('提示：您的当前状态不是停缴状态、不能进行离职、退休提取！', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
										
								}});	
							}
						
					}else{
						layer.alert('提示：'+result.CW, {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
										
								}});	
					}
				},
			});
		});
	</script>
</body>
</html>